package com.hx.er.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.hx.er.bean.base.CampaignBean;
import com.hx.er.bean.detail.CampaignDetailBean;
import com.hx.er.dao.IMarketingDao;
import com.hx.er.mapper.IMarketingMapper;

public class MarketingDaoImpl implements IMarketingDao {
	
	@Autowired
	private IMarketingMapper marketingMapper;

	@Override
	public List<CampaignDetailBean> getCampaignAliveList(Map<String, Object> conditions) {
		return this.marketingMapper.getCampaignAliveList(conditions);
	}

	@Override
	public int getCampaignAliveCount(Map<String, Object> conditions) {
		return this.marketingMapper.getCampaignAliveCount(conditions);
	}

	@Override
	public CampaignDetailBean getCampaignDetailById(long campaignId) {
		return this.marketingMapper.getCampaignDetailById(campaignId);
	}

	@Override
	public void insertCampaignWithoutId(CampaignBean campaignBean) {
		this.marketingMapper.insertCampaignWithoutId(campaignBean);
	}

	@Override
	public int updateCampaign(CampaignBean campaignBean) {
		return this.marketingMapper.updateCampaign(campaignBean);
	}

	@Override
	public int deleteCampaign(CampaignBean campaignBean) {
		return this.marketingMapper.deleteCampaign(campaignBean);
	}
}
